import Vue from 'vue'
import VueRouter from 'vue-router'

import ShuCheng from '@/views/shucheng.vue'
import ShuJia from '@/views/shujia.vue'
import FenLei from '@/views/fenlei.vue'
import WoDe from '@/views/wode.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/shucheng',
    component: ShuCheng
  },
  {
    path: '/shucheng',
    component: ShuCheng
  },
  {
    path: '/shujia',
    component: ShuJia
  },
  {
    path: '/fenlei',
    component: FenLei
  },
  {
    path: '/wode',
    component: WoDe
  },
  {
    path: '/login',
    component: () => import('@/views/login.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
